<template>
    <div>
      <van-nav-bar title="标签1"/>
      <van-password-input
        :value="valuep"
        info="密码为 6 位数字"
        @focus="showKeyboard = true"
      />
      <van-number-keyboard
        :show="showKeyboard"
        @input="onInput"
        @delete="onDelete"
        @blur="showKeyboard = false"
      />
    </div>
</template>

<script>
export default {
  data() {
    return {
      value: 3,
      minHour: 10,
      maxHour: 20,
      minDate: new Date(),
      maxDate: new Date(2019, 10, 1),
      currentDate: '',
      show: true,
      valuep: '123',
      showKeyboard: true
    }
  },
  methods:{
    onInput(key) {
      this.valuep = (this.valuep + key).slice(0, 6)
    },
    onDelete() {
      this.valuep = this.valuep.slice(0, this.valuep.length - 1)
    }
  }
}
</script>

<style scoped>
</style>